]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
checkbox: Correctly align label
authorJonas Dreßler <verdre@v0yd.nl>
Thu, 30 Jan 2020 14:26:32 +0000 (15:26 +0100)
committerJonas Dreßler <verdre@v0yd.nl>
Thu, 30 Jan 2020 14:48:26 +0000 (15:48 +0100)
The label needs to be center-aligned vertically so it's positioned in
the middle of the surrounding box, not at the top.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/967

js/ui/checkBox.js

index 183d719c8d13e0c407d070e2d8970569ce4ffd91..5b3c842a4d8b4e7f65496ffd4e6f36a36bc0e395 100644 (file)
@@ -19,7 +19,7 @@ class CheckBox extends St.Button {
         this._box = new St.Bin({ y_align: Clutter.ActorAlign.START });
         container.add_actor(this._box);
 
-        this._label = new St.Label();
+        this._label = new St.Label({ y_align: Clutter.ActorAlign.CENTER });
         this._label.clutter_text.set_line_wrap(true);
         this._label.clutter_text.set_ellipsize(Pango.EllipsizeMode.NONE);
         container.add_actor(this._label);